
import { Layout, Menu } from 'antd';
import { Outlet } from 'react-router-dom';
import menuData from '../../data/menuData.json';
const { Header } = Layout;

function TestApp() {
  return (
    <div className="TestApp">
      this is TestApp
    </div>
  );
}

const cout = 0;

function showCount() {
  return `当前计数：${cout}`;
}

// {} 的使用场景
function XccApp() {
  return (
    <Layout>
      <Header style={{ background: '#fff', padding: '0 20px', boxShadow: '0 2px 8px rgba(0, 0, 0, 0.06)' }}>
        <Menu mode="horizontal" defaultSelectedKeys={['home']} style={{ lineHeight: '64px' }}>
          {menuData.map(item => (
            <Menu.Item key={item.key}>{item.name}</Menu.Item>
          ))}
        </Menu>
      </Header>
      <Layout.Content style={{ padding: '24px', minHeight: 'calc(100vh - 64px)' }}>
        <Outlet />
      </Layout.Content>
    </Layout>
  );
}

export {
    XccApp,
    TestApp
};
